package cn.txun.csmall.product.springtest;

import org.springframework.context.annotation.Lazy;
import org.springframework.context.annotation.Scope;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.stereotype.Controller;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

//@Scope("prototype")
//@Lazy
//@Controller("controller")
public class ABController {

    ABController(){
        System.out.println("ABController的构造方法");
    }

    @PostConstruct
    public void init(){
        System.out.println("init()方法执行了");
    }

    @PreDestroy
    public void destroy(){
        System.out.println("destroy()方法执行了");
    }


    @Override
    public String toString() {
        return "这是我测试用的controller";
    }
}
